﻿namespace KingerRobot.MexicoSailunMDC.SpiService;
internal interface IRcsEquip
{
    /// <summary>
    /// 通过 LOCID 查询设备
    /// </summary>
    /// <param name="locId"></param>
    /// <returns></returns>
    PORcsEquip GetRcsEquipByLocId(long? locId);

    /// <summary>
    /// 通过默认位置(ems取料位)获取设备
    /// </summary>
    /// <param name="locId"></param>
    /// <returns></returns>
    PORcsEquip GetRcsEquipByDefaultLocId(long? locId);
    /// <summary>
    /// 通过ID查找设备
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    PORcsEquip GetRcsEquipById(long? id);
    /// <summary>
    /// 修改设备编号
    /// </summary>
    /// <param name="id"></param>
    /// <param name="errCode"></param>
    /// <returns></returns>
    int UpdateEquipErrCode(long? id, int errCode);
    /// <summary>
    /// 获取所有异常设备
    /// </summary>
    /// <returns></returns>
    List<PORcsEquip> GetAbnormalEquipAll();
    /// <summary>
    /// 通过ID查找正常设备
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    PORcsEquip GetWorkEquipById(long? id);
    /// <summary>
    /// 通过IDs查找正常设备
    /// </summary>
    /// <param name="ids"></param>
    /// <returns></returns>
    List<PORcsEquip> GetWorkEquipByIds(List<long?> ids);
    /// <summary>
    /// 通过ID查找设备是否异常(true 可用；false 不可用)
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    bool IsEnableEquipById(long? id);

    /// <summary>
    /// 通过Code查找设备
    /// </summary>
    /// <param name="equipCode"></param>
    /// <returns></returns>
    PORcsEquip GetRcsEquipByCode(string equipCode);
    /// <summary>
    /// 通过Code查找设备列表
    /// </summary>
    /// <param name="equipCode"></param>
    /// <returns></returns>
    List<PORcsEquip> GetRcsEquipListByCode(string equipCode);
}